package tech.lq0.dreamaticdelight.item.food.fukamizu;

import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.effect.MobEffectInstance;
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.food.FoodProperties;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;
import tech.lq0.dreamaticvoyage.tools.Livers;
import tech.lq0.dreamaticvoyage.tools.TooltipTool;
import vectorwing.farmersdelight.common.item.ConsumableItem;

import java.util.List;

public class CookedFukamizuFishSlice extends ConsumableItem {

    private static final FoodProperties FOOD = (new FoodProperties.Builder()).saturationMod(0.5F).nutrition(5)
            .effect(() -> new MobEffectInstance(MobEffects.LUCK, 400, 0), 1.0f)
            .build();

    public CookedFukamizuFishSlice() {
        super(new Properties().food(FOOD), true);
    }

    @Override
    public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, TooltipFlag pIsAdvanced) {
        pTooltipComponents.add(Component.translatable("des.dreamaticdelight.cooked_fukamizu_fish_slice").withStyle(ChatFormatting.GRAY));
        super.appendHoverText(pStack, pLevel, pTooltipComponents, pIsAdvanced);
        TooltipTool.addLiverInfo(pTooltipComponents, Livers.FUKAMIZU);
    }
}
